<?php
/**
 * Created by PhpStorm.
 * User: sykbxc
 * Date: 2019/4/2
 * Time: 11:24
 */

namespace App\Services\AdminService\Models;

use Spatie\Permission\Models\Permission;

class AdminPermissionsModel extends Permission
{

    //菜单图标
    public function icon()
    {
        return $this->belongsTo('App\Services\AdminService\Models\AdminIconsModel','icon_id','id');
    }

    //子权限
    public function childs()
    {
        return $this->hasMany('App\Services\AdminService\Models\AdminPermissionsModel','parent_id','id');
    }



}